<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');

?>
<style>
body {
	margin:0 10px 0 0;
	font-size:14px;
}
.cont {
	float:left;
	margin:0 0 0 20px;
}
.page {
	margin:0 auto;
}
th {
	height:14px;
	font-size:14px;
}
tr {
	height:30px;
	border-bottom:1px solid #eee;
}

</style>
<div class="cont">
<table cellspacing="4" cellpadding="4" align="Center" id="gvDepot" style="color:#333333;width:960px;text-align: center; font-size:14px; margin-bottom: 5px;">
		<tbody>
			<tr style="color:White;background-color:#507CD1;font-weight:bold;">				
				<th width="5%" scope="col">序号</th>
				<th width="10%" scope="col">转运单号</th>
				<th width="10%" scope="col">用户</th>				
				<th width="8%" scope="col">重量</th>
				<th width="5%" scope="col">渠道</th>
				<th width="10%" scope="col">下单时间</th>
				<th width="10%" scope="col">订单运费</th>
				<th width="10%" scope="col">申报价值</th>
				<th width="10%" scope="col">订单状态</th>				
				<th width="10%" scope="col">备注</th>
				<th width="7%" scope="col">是否支付</th>
				<th width="5%" scope="col">操作</th>
		</tr>
		<!-- 表单内容 -->
		<?php foreach ($datas as $r){?>
		<tr>
		<td><?php $kaishi++;echo $kaishi?></td>		
		<td><?php echo $r['zhnumber']?></td>
		<td><?php echo $r['username']?></td>		
		<td><?php echo $r['weight'].'磅'?></td>
		<td>
		<?php 
		switch ($r['channel']){
			case 1:
				echo 'A渠道';
				break;
			case 2:
				echo 'B渠道';
				break;
			case 3:
				echo 'C渠道';
				break;
			case 4:
				echo 'D渠道';
				break;
			case 5:
				echo 'E渠道';
				break;
			case 6:
				echo 'F渠道';
				break;
		}
		?>		
		</td>
		<td><?php echo date('Y-n-d',$r['uptime'])?></td>
		<td><?php echo $r['orderprice'].'元'?></td>
		<td><?php echo $r['sbvalue'].'元'?></td>		
		<td>
		<?php 
		switch ($r['state']){
			case 1:
				echo '订单审核中';
				break;
			case 2:
				echo '审核完成待入库';
				break;
			case 3:
				echo '已入库';
				break;
			case 4:
				echo '转运中';
				break;
			case 5:
				echo '已出库';
				break;
			case 6:
				echo '运送完成';
				break;
			case 7:
				echo '订单已取消';
				break;
			default:
				echo '未知状态';
		}		
		
		?>
		
		</td>
		<td><?php echo $r['remark']?></td>
		<td><?php echo $r['ispay']?></td>
		<td><?php if($r['state']!=6&&$r['state']!=7)echo "<a href='index.php?m=order&c=manage&a=ddzt&menuid=1669&orderid={$r['id']}' style='color:red'>修改</a>"?></td>
		
		</tr>
		<?php }?>
</tbody>
</table>
<div class="page" style="margin:10px 0 0 300px;">
<?php echo $pages?>
</div>		
</div>